﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类bFeeTypeSubject
	/// </summary>
	[Serializable]
	public class bFeeTypeSubject : Entity 
	{ 
		 public bFeeTypeSubject() 
            : base("bFeeTypeSubject") 
        { 

        }


		#region Model
		private int _UID;
		private int? _FeeTypeID;
		private string _CompCode;
		private string _CompName;
		private string _IncomeSubject;
		private string _Cost1Subject;
		private string _Cost2Subject;
		private string _InsteadSubject;
		private string _Note;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? FeeTypeID
		{
			get{ return _FeeTypeID; }
			set
			{
				this.OnPropertyValueChange(_.FeeTypeID,_FeeTypeID,value);
				this._FeeTypeID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CompCode
		{
			get{ return _CompCode; }
			set
			{
				this.OnPropertyValueChange(_.CompCode,_CompCode,value);
				this._CompCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CompName
		{
			get{ return _CompName; }
			set
			{
				this.OnPropertyValueChange(_.CompName,_CompName,value);
				this._CompName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string IncomeSubject
		{
			get{ return _IncomeSubject; }
			set
			{
				this.OnPropertyValueChange(_.IncomeSubject,_IncomeSubject,value);
				this._IncomeSubject = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Cost1Subject
		{
			get{ return _Cost1Subject; }
			set
			{
				this.OnPropertyValueChange(_.Cost1Subject,_Cost1Subject,value);
				this._Cost1Subject = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Cost2Subject
		{
			get{ return _Cost2Subject; }
			set
			{
				this.OnPropertyValueChange(_.Cost2Subject,_Cost2Subject,value);
				this._Cost2Subject = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string InsteadSubject
		{
			get{ return _InsteadSubject; }
			set
			{
				this.OnPropertyValueChange(_.InsteadSubject,_InsteadSubject,value);
				this._InsteadSubject = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.UID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.UID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.FeeTypeID,
				_.CompCode,
				_.CompName,
				_.IncomeSubject,
				_.Cost1Subject,
				_.Cost2Subject,
				_.InsteadSubject,
				_.Note,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_FeeTypeID,
				_CompCode,
				_CompName,
				_IncomeSubject,
				_Cost1Subject,
				_Cost2Subject,
				_InsteadSubject,
				_Note,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "FeeTypeID":
                    this._FeeTypeID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CompCode":
                    this._CompCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CompName":
                    this._CompName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IncomeSubject":
                    this._IncomeSubject = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Cost1Subject":
                    this._Cost1Subject = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Cost2Subject":
                    this._Cost2Subject = DataHelper.ConvertValue<string>(value);
                    break; 
				case "InsteadSubject":
                    this._InsteadSubject = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "FeeTypeID":
                    return this._FeeTypeID; 
				case "CompCode":
                    return this._CompCode; 
				case "CompName":
                    return this._CompName; 
				case "IncomeSubject":
                    return this._IncomeSubject; 
				case "Cost1Subject":
                    return this._Cost1Subject; 
				case "Cost2Subject":
                    return this._Cost2Subject; 
				case "InsteadSubject":
                    return this._InsteadSubject; 
				case "Note":
                    return this._Note; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","bFeeTypeSubject");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","bFeeTypeSubject","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FeeTypeID = new Field("FeeTypeID","bFeeTypeSubject","FeeTypeID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CompCode = new Field("CompCode","bFeeTypeSubject","CompCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CompName = new Field("CompName","bFeeTypeSubject","CompName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IncomeSubject = new Field("IncomeSubject","bFeeTypeSubject","IncomeSubject");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Cost1Subject = new Field("Cost1Subject","bFeeTypeSubject","Cost1Subject");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Cost2Subject = new Field("Cost2Subject","bFeeTypeSubject","Cost2Subject");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field InsteadSubject = new Field("InsteadSubject","bFeeTypeSubject","InsteadSubject");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","bFeeTypeSubject","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","bFeeTypeSubject","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","bFeeTypeSubject","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","bFeeTypeSubject","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","bFeeTypeSubject","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","bFeeTypeSubject","ModifyDate");
		}
		#endregion

 
	}
}

